<!DOCTYPE html>
<html lang="en">

<head>
    <title>赛事竞猜</title>
    <meta charset="UTF-8">
    
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <link href="../../css/public.css" rel="stylesheet">

    <style>
        .home_zhangdui_nav {
            overflow: hidden;
            background: #030e3d url('../../images/reg/back.png') 10px center no-repeat;
            border-bottom: 1px solid #24254E;
            background-size: 0.7rem;
        }



        .trad_contain{
           padding-top: 70px;
           background: #040d3c;
    padding-bottom: 1%;
        }
   
        .list {
            padding: 0 5px;
            padding: 0 .3rem;
            width: 90%;
            background: #1B1D5D;
            margin: auto;
            border-radius: 5px;
            margin-bottom: 20px;
        }
        .list>div{
            display: flex;
            font-size: .4rem;
            
     
        }
        
        .list>div div{
            flex: 2;
        }
        .list>div div:nth-child(1){
            color: #BFC1F2;
        }
        .list>div div:nth-child(2){
            flex: 1;
            text-align: center;
            
        }
        .overTrade{
            border-bottom: 1px solid #2A2B6B;
        }
        .list>div div:nth-child(3){
            text-align: right;
        }
        .tradeType,.accountMoney{
            color: #FFCD29 ;
        }
         .accountMoney{
            font-size: .5rem
        }
        .betMoney{
            color:#BFC1F2;
        }
        .time{
            font-size: .35rem;
            color:#7E85C2;
        }
        .tradState{
           color:  #7E85C2;
        }
        .startTrad,.overTrade{
            
            height: 35px;
            line-height: 35px;
        }
        .account{
            height: 50px;
            line-height: 50px;
        }
        .tradeType img{
            width: .4rem
        }
        .tradStateNo{
            color: #bfc1f2;
            font-size: .45rem;
        }
        .vs{
            width: .4rem;
            vertical-align: middle;
            margin: 0 2px;
        }
        .je{
            color: #BFC1F2;
            font-size: .35rem;
        } 
            #getMoney{
                color: #FFCD29 ;
            font-size: .5rem;
            }
    </style>
</head>

<body>

    <body>
        <div class="home_zhangdui_nav">
            <span class="goBack"></span>
            竞猜记录
        </div>

        <div class="trad_contain">


         



        </div>

        <script src="../../js/jquery-3.2.1.min.js"></script>
        <script src="../../js/public.js"></script>
        <script>
        $(function(){
            $.post(jcRecordUrl,res=>{
                console.log(res)
                let obj = res.obj,
                recodes,
                type,
                result,
                fdWinLose,
                fdBettingAmount
                  obj.forEach(item => {

                    if(item.fdWinLose==null){
                        fdWinLose=''
                    }
                    else{
                        if(item.fdResult==0){
                        fdWinLose=`-${item.fdWinLose}`
                    }
                    else if(item.fdResult==1){
                        fdWinLose=`+${item.fdWinLose}`
                    }
                    }
                    if(item.fdIsSettlement==0){
                        result='未结算'
                    }
                    else if(item.fdIsSettlement==1){
                        result='已结算'
                    }
                   
                    if(item.fdType==2){
                        type='总场胜负'
                        recodes=`<div class="list">
                        <div class="startTrad">
                             <div class="gameName">投注:${item.fdBettingWarName}</div>
                             <div class="time">金额:<span class="je">${item.fdBettingAmount}</span> </div>
                        </div>
                        <div class="overTrade">
                             <div>类型：<span class="je">${type}</span></div>
                             <div class="betMoney"></div>
                             <div class="time">${item.fdBettingTime}</div>
                        </div>
         
                        <div class="account">
                             <div id="getMoney" class="accountMoney">${fdWinLose}</div>
                             <div class="accountMoney"></div>
                             <div class="tradState">${result}</div>
                        </div>
                     </div>`
                    }
                    else if(item.fdType==0){
                        type='击杀人数'
                        recodes=`<div class="list">
                        <div class="startTrad">
                             <div class="gameName">投注:${item.fdBettingWarName}</div>
                             <div class="time">金额:<span class="je">${item.fdBettingAmount}</span> </div>
                        </div>
                        <div class="overTrade">
                             <div>类型：<span class="je">${type}</span></div>
                             <div class="betMoney"></div>
                             <div class="time">${item.fdBettingTime}</div>
                        </div>
         
                        <div class="account">
                             <div id="getMoney" class="accountMoney">${fdWinLose}</div>
                             <div class="accountMoney"></div>
                             <div class="tradState">${result}</div>
                        </div>
                     </div>`
                    }
                    else if(item.fdType==1){
                        type='大小'
                        recodes=`<div class="list">
                        <div class="startTrad">
                             <div class="gameName">投注:${item.fdBettingNum}</div>
                             <div class="time">金额:<span class="je">${item.fdBettingAmount}</span> </div>
                        </div>
                        <div class="overTrade">
                             <div>类型：<span class="je">${type}</span></div>
                             <div class="betMoney"></div>
                             <div class="time">${item.fdBettingTime}</div>
                        </div>
         
                        <div class="account">
                             <div id="getMoney" class="accountMoney">${fdWinLose}</div>
                             <div class="accountMoney"></div>
                             <div class="tradState">${result}</div>
                        </div>
                     </div>`
                    }
    
                    else if(item.fdType==3){
                        type='特码'
                        recodes=`<div class="list">
                        <div class="startTrad">
                             <div class="gameName">投注:${item.fdBettingNum}</div>
                             <div class="time">金额:<span class="je">${item.fdBettingAmount}</span> </div>
                        </div>
                        <div class="overTrade">
                             <div>类型：<span class="je">${type}</span></div>
                             <div class="betMoney"></div>
                             <div class="time">${item.fdBettingTime}</div>
                        </div>
         
                        <div class="account">
                             <div id="getMoney" class="accountMoney">${fdWinLose}</div>
                             <div class="accountMoney"></div>
                             <div class="tradState">${result}</div>
                        </div>
                     </div>`
                    }
                    
                      $('.trad_contain').append(recodes)
                      
                  });
            })
         })
        
        
        </script>
    </body>

</html>